home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / db2ios.arc / REPORT.SIG < prev    next >
Encoding:
Text File  |  1983-01-04  |  8.5 KB  |  268 lines

  1. * report.sig 08/18/83
  2. STORE t TO more
  3. DO WHILE more
  4.     STORE CHR(PEEK (063)) TO dr
  5.     ERASE
  6.     STORE 'Y' TO printer
  7.     STORE 'N' TO disk
  8.     STORE '        ' TO filename
  9.     STORE '?' TO command
  10.     @  2, 0 SAY "--------------------------------------------------------------------------------"
  11.     @  2,18 SAY "> > >  R E P O R T  M E N U  < < <"
  12.     @  5,18 SAY "1. Print return address labels"                     
  13.     @  6,18 SAY "2. Print shipping labels"
  14.     @  7,18 SAY "3. Print shipping documents"
  15.     @  8,18 SAY "4. Print report of orders shipped"
  16.     @  9,18 SAY "5. Print report of orders completed"
  17.     @ 10,18 SAY "6. Print backorder report"
  18.     @ 11,18 SAY "7. Display Records on screen"
  19.     @ 12,18 SAY "8. Make WordStar-MailMerge File"
  20.     @ 13,18 SAY "9. Return to Main Menu"
  21.     @ 17, 0 SAY "--------------------------------------------------------------------------------"
  22.     @ 20,30 SAY "WHAT NEXT"
  23.     @ 20,40 GET command PICTURE '!'
  24.     READ
  25.     IF command  >'3' .AND. command <  '7'
  26.         @ 20,00
  27.         @ 19,22 SAY "Send Report to the Printer (Y/N)"
  28.         @ 19,55 GET printer PICTURE '!'
  29.         READ
  30.         @ 21,22 SAY "Send Report to a Disk File (Y/N)"
  31.         @ 21,55 GET disk PICTURE '!'
  32.         READ
  33.         IF disk ='Y'
  34.             @ 21,00
  35.             @ 21,22 SAY "Enter Disk File Name"
  36.             @ 21,44 GET filename PICTURE '!!!!!!!!'
  37.             @ 21,54 SAY "(.TXT will be added )"
  38.             READ
  39.             @ 21,00
  40.             @ 21,22 SAY 'Select drive to put Files on  ' GET dr PICTURE '!'
  41.             READ
  42.             DO WHILE @(dr,'ABCDM') = 0
  43.                 @ 21,00
  44.                 @ 21,22 SAY 'Select drive to put Files on  ' GET dr PICTURE '!'
  45.                 READ
  46.             ENDDO while @
  47.         ENDIF disk = Y
  48.         IF printer = 'Y'
  49.             @ 23,00 SAY 'Make Printer Ready and hit any key'
  50.             SET CONSOLE OFF
  51.             WAIT
  52.             SET CONSOLE ON
  53.             SET print ON
  54.         ENDIF printer = Y
  55.         IF disk = 'Y' .AND. filename <> ' '
  56.             * make a proper REPORT file name that is of type TXT
  57.             STORE @('.',filename) TO length
  58.             IF length = 0 .OR. length > 8
  59.                 STORE 9 TO length
  60.             ENDIF length
  61.             STORE $(filename,1,length-1) TO filename
  62.             STORE '&dr.:'+filename+'.TXT' TO filename
  63.             SET ALTERNATE TO &filename
  64.             SET ALTERNATE ON
  65.         ENDIF disk = Y and filename <> ''
  66.     ENDIF disk = Y
  67.     ERASE
  68.     DO CASE
  69.         CASE command = '1'
  70. SET PRINT ON
  71. SET CONSOLE OFF
  72. * set printer codes for small type
  73. ? CHR(29)
  74. ? CHR(27) + chr(56)
  75. SET PRINT OFF
  76. SET CONSOLE ON
  77. ERASE
  78. STORE t TO lineup
  79. DO WHILE LINEUP
  80.     STORE '?' TO command
  81.     @ 10,00
  82.     @ 11,00
  83.     @ 10,10 SAY 'Please line up the top of the ribbon with the top of the label'
  84.     @ 11,10 SAY 'When lined up hit ENTER for a print check.'
  85.     SET CONSOLE OFF
  86.     WAIT
  87.     SET PRINT ON
  88.     SET MARGIN TO 0
  89.     ? 'THE TOP OF THE TOP LINE SHOULD BE ABOUT'
  90.     ? '1/4" FROM THE TOP OF THE LABEL'
  91.     ? ' '
  92.     SET PRINT OFF
  93.     SET CONSOLE ON
  94.     @ 10,00
  95.     @ 11,00
  96.     @ 10,10 SAY 'Are you lined up to print (Y/N) '
  97.     @ 10,44 GET command picture '!'
  98.     READ
  99.     CLEAR GETS
  100.     IF command = 'Y'
  101.         SET PRINT ON
  102.         ? ' '
  103.         ? ' '
  104.         ? ' '
  105.         ? ' '
  106.         ? ' '
  107.         SET PRINT OFF
  108.         STORE f TO lineup
  109.         STORE t TO printlab
  110.     ENDIF command = y
  111. ENDDO while lineup
  112. ERASE
  113. DO WHILE printlab = t
  114.     STORE '?' TO command
  115.     STORE 0 TO PRNTNO
  116.     @ 10,00
  117.     @ 11,00
  118.     @ 12,00
  119.     @ 13,00
  120.     @ 15,00
  121.     @ 13,12 SAY " How many return address labels shall we print ? " GET PRNTNO
  122.     READ
  123.     DO WHILE PRNTNO > 0
  124.         SET PRINT ON
  125.         SET CONSOLE OFF
  126.         SET MARGIN TO 5
  127.         ? ' '
  128.         ? ' SIG/M SOFTWARE'              
  129.         ? '    Box 97'    
  130.         ? 'Iselin, NJ 08830'
  131.         ? ' '
  132.         ? ' '
  133.         ? ' '
  134.         ? ' '
  135.         STORE PRNTNO - 1 TO PRNTNO
  136.     ENDDO while prntno
  137.  
  138.     SET PRINT OFF
  139.     SET CONSOLE ON
  140.         SET PRINT ON
  141.         ? CHR(30)
  142.         ? CHR(27) + CHR(54)
  143.         EJECT
  144.         SET PRINT OFF
  145.         SET CONSOLE ON
  146.  STORE f TO printlab
  147. ENDDO while printlab 
  148. ERASE
  149. RELEASE all
  150. STORE t TO first
  151. STORE t TO more
  152. STORE '?' TO command
  153.  
  154. CASE COMMAND = '2'
  155.           @ 19,22 SAY "Send Report to a Disk File (Y/N)"
  156.             @ 19,55 GET disk PICTURE '!'
  157.             READ
  158.             IF disk ='Y'
  159.                 @ 19,00
  160.                 @ 19,22 SAY "Enter Disk File Name"
  161.                 @ 19,44 GET filename PICTURE '!!!!!!!!'
  162.                 @ 19,54 SAY "(.TXT will be added )"
  163.                 READ
  164.                 @ 19,00
  165.                 @ 19,22 SAY 'Select drive to put Files on  ' GET dr PICTURE '!'
  166.                 READ
  167.                 DO WHILE @(dr,'ABCDM') = 0
  168.                     @ 19,00
  169.                     @ 19,22 SAY 'Select drive to put Files on  ' GET dr PICTURE '!'
  170.                     READ
  171.                 ENDDO while @
  172.             ENDIF disk = Y
  173.             @ 19,00
  174.             @ 20,22 SAY "Send Report to the Printer (Y/N)"
  175.             @ 20,55 GET printer PICTURE '!'
  176.             READ
  177.             IF printer = 'Y'
  178.                 SET PRINT ON
  179.                 SET CONSOLE OFF
  180.                 ? CHR(28)
  181.                 SET PRINT OFF
  182.                 SET CONSOLE ON
  183.                 ERASE
  184.                 STORE t TO lineup
  185.                 DO WHILE LINEUP
  186.                     STORE '?' TO command
  187.                     @ 10,00
  188.                     @ 11,00
  189.                     @ 10,10 SAY 'Please line up the top of the ribbon with the top of the label'
  190.                     @ 11,10 SAY 'When lined up hit ENTER for a print check.'
  191.                     SET CONSOLE OFF
  192.                     WAIT
  193.                     SET PRINT ON
  194.                     SET MARGIN TO 0
  195.                     ? 'THE TOP OF THE TOP LINE SHOULD BE ABOUT'
  196.                     ? '1/4" FROM THE TOP OF THE LABEL'
  197.                     ? ' '
  198.                     SET PRINT OFF
  199.                     SET CONSOLE ON
  200.                     @ 10,00
  201.                     @ 11,00
  202.                     @ 10,10 SAY 'Are you lined up to print (Y/N) '
  203.                     @ 10,44 GET command picture '!'
  204.                     READ
  205.                     CLEAR GETS
  206.                     IF command = 'Y'
  207.                         SET PRINT ON
  208.                         ? ' '
  209.                         ? ' '
  210.                         ? ' '
  211.                         ? ' '
  212.                         ? ' '
  213.                         STORE f TO lineup
  214.                         STORE t TO printlab
  215.                     ENDIF command = y
  216.                 ENDDO WHILE lineup
  217.             ENDIF printer = y
  218.             DO labels.sig
  219.         CASE command = '3'
  220.             DO shipdoc.sig
  221.         CASE command = '4'
  222.             DO shipped.sig
  223.         CASE command = '5'
  224.             DO complete.sig
  225.         CASE command = '6'
  226.             DO backordr.sig
  227.         CASE command = '7'
  228.             ERASE
  229.             @ 02,12 SAY 'Records are displayed by Last names'
  230.             @ 05,12 SAY 'You may choose the first letter'
  231.             @ 06,12 SAY 'of the starting location of the records'
  232.             @ 09,12 SAY 'When WAITING hit space bar to'
  233.             @ 10,12 SAY 'Continue... or ESCape to Quit'
  234.             * get a starting point in file
  235.             STORE 'A' TO stletter
  236.             @ 17,12 SAY 'Letter of alphabet at which to start display'
  237.             @ 17,57 Get stletter PICTURE '!'
  238.             READ
  239.             * goto starting point or next if no find
  240.             FIND &stletter
  241.             DO WHILE # = 0
  242.                 STORE 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ' TO ALPHABET
  243.                 STORE @(stletter,ALPHABET) + 1 TO NEXL
  244.                 STORE $(ALPHABET,NEXL,1) TO stletter
  245.                 FIND &stletter
  246.                 RELEASE alphabet
  247.             ENDDO while #
  248.             * display selected list
  249.             ERASE
  250.             SET ESCAPE OFF
  251.             DISPLAY NEXT 65000 lname,zip,comp,entered,shipped
  252.             IF eof
  253.                 WAIT
  254.             ENDIF
  255.             SET ESCAPE ON
  256.         CASE command = '8'
  257.             DO wsfile.sig
  258.         CASE (command = '9' .OR. COMMAND = 'Q')
  259.             STORE f TO more
  260.     ENDCASE
  261.     SET PRINT OFF
  262.     SET ALTERNATE OFF
  263. ENDDO while more
  264. RELEASE ALL
  265. STORE t TO more
  266. STORE t TO first
  267. STORE '?' TO command
  268.